package com.cn.data.jpa.tool.spring.ioc.bean.xml;

import com.cn.data.jpa.domain.Logon;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @Author : chenl
 * @Date : 2019/5/28 0028 9:46
 */

public class BeanFactoryDemo {

    public static void main(String[] args) {

        ApplicationContext applicationContext  = new FileSystemXmlApplicationContext("F:\\webdemo\\spring-boot-sample-data-jpa\\src\\main\\resources\\beans.xml");


        Logon logon = (Logon) applicationContext.getBean("logon");
        System.out.println(logon);

        Person person = (Person) applicationContext.getBean("josn");
        System.out.println(person);

    }
}
